Page({
  data:{

  },
  onLoad(options){
    
  },
  onClickIcon(e){
    console.log(e)
  },
  gonghao(e){
    const gonghao = e.detail
    this.setData({gonghao})
  },
  mima(e){
    const mima = parseInt(e.detail)
    this.setData({mima})
  },
  getUserProfile(e){
    const { gonghao, mima } = this.data;
    const user = 'wenchuan';
    const password = 2006;
    if (gonghao === user && mima === password) {
      wx.showToast({
        title: '登录成功',
        icon:'success',
        success:res=>{
          wx.navigateTo({
            url: '/pages/my/video-manage/update/index',
          })
        }
      })
    } else {
      if (!gonghao || gonghao !== user) {
        wx.showToast({
          title: '工号不正确',
          icon: 'error',
          mask : true
        });
      } else if (!mima || mima !== password) {
        wx.showToast({
          title: '密码不正确',
          icon: 'error',
          mask : true
        });
      }
    }
    
  }
})